package com.holy.sh.module_base_mvp.utils;

import java.util.List;

/**
 * ClassName: NullUtils<p>
 * Author: Alpha<p>
 * Des: NullUtils<p>
 * AutoLink: http://alphaknife.github.io/<p>
 * CreateDate: 2016/6/7 13:36<p>
 */
public class NullUtils {

    /**
     * 检查是否为空
     *
     * @param t
     * @param <T>
     * @return
     */
    public static <T> T chekcNoNull(T t) {
        if (t == null) {
            throw new NullPointerException("null point Exception");
        }
        return t;
    }

    public static <T> boolean isEmpty(List<T> list){
        if (list.size()==0||list==null){
            return true;
        }
        return false;
    }
}
